﻿//#define _CRT_SECURE_NO_WARNINGS 1
//////在32位系统环境，编译选项为4字节对齐
////struct A
////{
////	int a;// 4/4-4  0 1 2 3
////	short b;// 2/4-2   4 5
////	int c;//  4/4-4    8 9 10 11
////	char d;// 1/4-1   12
////};
////struct B
////{
////	int a;  // 0 1 2 3
////	short b;//4 5
////	char c;// 6
////	int d;// 8 9 10 11   12
////};
////
////#include<stdio.h>
//int main()
//{
//	typedef struct 
//	{
//		int a;//4/8-4  0 1 2 3
//		char b;//1/8-1   4
//		short c;//2/8-2  6 7
//		short d;//2/8-2  8 9
//		//4-12
//	}AA_t;
//
//	//	printf("%llu", sizeof(struct A));
//}
//
////#pragma pack(4)/*编译选项，表示4字节对齐 平台：VS2013。语言：C语言*/
////int main(int argc, char* argv[])
////{
////	struct tagTest1
////	{
////		short a; //2/4  -2  0 1
////		char d;// 1/4 -1   2
////		long b;// 8/4-4    4 5 6 7 
////		long c;// 8/4-4    8 9 10 11
////		//4的倍数-12 
////	};
////	struct tagTest2
////	{
////		long b;//8/4-4    0 1 2 3
////		short c;//2/4-2    4 5
////		char d;//1/4-1     6
////		long a;//8/4-4     8 9 10 11
////		//4-12
////	};
////	struct tagTest3
////	{
////		short c;//2/4-2 0 1
////		long b;//8/4-4   4 5 6 7 
////		char d;//1/4-1    8
////		long a;//8/4-4   12 13 14 15
////		//4-16
////	};
////	//struct tagTest1 stT1;
////	//struct tagTest2 stT2;
////	//struct tagTest3 stT3;
////
////	printf("%d %d %d", sizeof(struct tagTest1), sizeof(struct tagTest2), sizeof(struct tagTest3));
////	return 0;
////}
////#pragma pack()
//
//typedef struct
//{
//	int a;
//	char b;
//	short c;
//	short d;
//}AA_t;